package com.yz.jdd.module.cashier.scanpay;

import android.graphics.Bitmap;


import com.yz.jdd.module.cashier.scanpay.exception.ExceptionContract;
import com.yz.jdd.network.ApiCallback;
import com.yz.jdd.network.request.Request_Pay;

import rx.Subscription;

/**
 * Created by shibin on 2017/2/27.
 */

public class ScanpayContract {
    interface IScanpayModel extends ExceptionContract.IExceptionModel {
        Subscription doPay(Request_Pay request_pay, ApiCallback callback);


    }

    interface ScanpayView extends ExceptionContract.ExceptionView {

        // 被扫二维码失效时间
        void failureTime(int time);

        void setAliQrcode(Bitmap bitmap);

        void setWxQrcode(String url);

        void qrLoadingFialed(String msg);


        void restartScanner();

        void chanageLoadingMsg(String msg);

        void showFroceCancelView(String msg);

        void dismissPayLoading();

        void showPayLoadingNoCancelable(String msg);

        void showHuaBeiDialog();


    }

    interface Presenter extends ExceptionContract.Presenter {
        void toPay(Request_Pay request_pay);//支付

        void intervalStatus();

        void stopScanner();

        /**
         * 解绑支付请求
         */
        void unsubscribePay();

        /**
         * 解绑查询请求
         */
        void unsubscribeStatus();

        /**
         * 解绑定时器
         */
        void unsubscribePeriod();


        String getClientOrderId();

        String getOrderId();


    }
}
